const express = require("express");

const { getGoods, getGoodsById, add, getCart, delete: mydelete, update } = require("../controller/cartController");


const cartRouter = express.Router();


//获取所有的产品信息
cartRouter.get("/getgoods", getGoods);
// //根据id查询产品详情
cartRouter.get("/getGoodsById", getGoodsById);
// //加入购物车
cartRouter.post("/add", add);

cartRouter.get("/getCart", getCart);

cartRouter.post("/delete", mydelete);

cartRouter.post("/update", update)





module.exports = {
    cartRouter
}